<%@page pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@taglib tagdir="/WEB-INF/tags" prefix="bot"%>
<%@taglib uri="/WEB-INF/log.tld" prefix="log"%>
<fmt:formatDate var="todayDate" type="date" pattern="dd-MMM-yyyy" value="${today}"/>

<bot:page title="Logs on ${todayDate}">
<jsp:attribute name="heading">
<c:choose>
    <c:when test="${isSearch}">
<a href="<c:url value="/app/log"/>" title="back to current logs">&lt;&lt;</a>
&nbsp;&nbsp;&nbsp;Search for &quot;${search}&quot; in the logs as seen by ${bot.nick} on ${bot.channelName}&nbsp;&nbsp;&nbsp;
    </c:when>
    <c:otherwise>
<a href="<c:url value="${prevURI}"/>">&lt;&lt;</a>
&nbsp;&nbsp;&nbsp;Logs on ${todayDate} as seen by ${bot.nick} on ${bot.channelName}&nbsp;&nbsp;&nbsp;
<a href="<c:url value="${nextURI}"/>">&gt;&gt;</a>
    </c:otherwise>
</c:choose>
</jsp:attribute>
<jsp:body>
<div class="logs">
<log:render dateHeader="${isSearch}" logs="${logs}"/>
</div>
<c:if test="${isSearch}">
<div>
<bot:cmdlink uri="${firstSearch}">|&lt;</bot:cmdlink> <bot:cmdlink uri="${prevSearch}">&lt;&lt;</bot:cmdlink> Results ${offset} to ${offset + hpp -1} of ${hits} <bot:cmdlink uri="${nextSearch}">&gt;&gt;</bot:cmdlink> <bot:cmdlink uri="${lastSearch}">&gt;|</bot:cmdlink>
</div>  
</c:if>
</jsp:body>
</bot:page>